package com.slz3.business.module.goodsManagement.gooAttributeValue.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.goodsManagement.gooAttributeValue.domain.GooAttributeValue;
import com.slz3.business.module.goodsManagement.gooAttributeValue.domain.GooAttributeValueCondition;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

@Component
public class GooAttributeValueResAtomic {

    public Mono<ServerResponse> add_$GooAttributeValueUpdateLock(ServerRequest req, GooAttributeValue gooAttributeValue) {
        return GooAttributeValueResSafeValid.add(req, gooAttributeValue) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooAttributeValueResExecutor.add(req, gooAttributeValue);
    }

    public Mono<ServerResponse> delete_$GooAttributeValueUpdateLock(ServerRequest req, GooAttributeValueCondition gooAttributeValueCondition) {
        return GooAttributeValueResSafeValid.delete(req, gooAttributeValueCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooAttributeValueResExecutor.delete(req);
    }

    public Mono<ServerResponse> modify_$GooAttributeValueUpdateLock(ServerRequest req, GooAttributeValue gooAttributeValue) {
        return GooAttributeValueResSafeValid.modify(req, gooAttributeValue) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooAttributeValueResExecutor.modify(req, gooAttributeValue);
    }

    public Mono<ServerResponse> info_$GooAttributeValueUpdateLock(ServerRequest req) {
        return GooAttributeValueResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooAttributeValueResExecutor.info(req);
    }

    public Mono<ServerResponse> auditSubmit_$GooAttributeValueUpdateLock(ServerRequest req, GooAttributeValueCondition gooAttributeValueCondition) {
        return GooAttributeValueResSafeValid.auditSubmit(req, gooAttributeValueCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooAttributeValueResExecutor.auditSubmit(req);
    }

    public Mono<ServerResponse> audit_$GooAttributeValueUpdateLock(ServerRequest req, GooAttributeValueCondition gooAttributeValueCondition) {
        return GooAttributeValueResSafeValid.audit(req, gooAttributeValueCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooAttributeValueResExecutor.audit(req);
    }

    public Mono<ServerResponse> auditReject_$GooAttributeValueUpdateLock(ServerRequest req, GooAttributeValueCondition gooAttributeValueCondition) {
        return GooAttributeValueResSafeValid.auditReject(req, gooAttributeValueCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooAttributeValueResExecutor.auditReject(req);
    }


    public Mono<ServerResponse> usingEnable_$GooAttributeValueUpdateLock(ServerRequest req, GooAttributeValueCondition gooAttributeValueCondition) {
        return GooAttributeValueResSafeValid.usingEnable(req, gooAttributeValueCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooAttributeValueResExecutor.usingEnable(req);
    }

    public Mono<ServerResponse> usingDisable_$GooAttributeValueUpdateLock(ServerRequest req, GooAttributeValueCondition gooAttributeValueCondition) {
        return GooAttributeValueResSafeValid.usingDisable(req, gooAttributeValueCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooAttributeValueResExecutor.usingDisable(req);
    }
}
